#include <iostream>
#include <iomanip>
using std::cin;using std::cout;
using std::endl;
void displayCircleArea(double radius)
{
	const double pi = 3.1415926;
	double area = radius * radius * pi;

	cout << std::setw(20) << std::right	//宽20，右对齐
		<< std::setfill('*') << std::fixed
		<< std::setprecision(3) << area << endl //结果保留小数点后3位
		<< std::setfill(' ') << std::left; //关闭setfill('*')并左对齐

	cout.unsetf(std::ios_base::fixed); //关闭fixed
	cout << std::setw(25) //宽25
		<< std::setprecision(10) << area << endl;//结果保留10位有效数字

}
int main()
{
	double radius1, radius2;
	cout << "分别输入半径为40和928.335，计算圆面积" << endl;
	cin >> radius1 >> radius2;	//输入40, 928.335
	displayCircleArea(radius1);
	displayCircleArea(radius2);

	system("pause");
	return 0;
}